package com.itls.recommendedgames.entity;
import java.math.BigDecimal;
import java.time.LocalDateTime;

public class UserLibrary {
    // Getters and Setters
    private Integer id;
    private Integer userId;
    private Integer gameId;
    private BigDecimal playTimeHours; // 对应 DECIMAL(8,2)
    private LocalDateTime lastPlayed; // 对应 TIMESTAMP

    // 构造函数
    public UserLibrary() {}
    public UserLibrary(Integer userId, Integer gameId) {
        this.userId = userId;
        this.gameId = gameId;
        this.playTimeHours = new BigDecimal("0.00");
        this.lastPlayed = null;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGameId() {
        return gameId;
    }

    public void setGameId(Integer gameId) {
        this.gameId = gameId;
    }

    public BigDecimal getPlayTimeHours() {
        return playTimeHours;
    }

    public void setPlayTimeHours(BigDecimal playTimeHours) {
        this.playTimeHours = playTimeHours;
    }

    public LocalDateTime getLastPlayed() {
        return lastPlayed;
    }

    public void setLastPlayed(LocalDateTime lastPlayed) {
        this.lastPlayed = lastPlayed;
    }
}